<link href="/theme/Admin/css/control/index.css" rel="stylesheet">
<script src="/theme/Default/js/jquery.validate.js"></script>
<script src="/theme/Admin/js/CategoryManage/indexValidate.js"></script>

<form action="/admin/CategoryManage/edit/<?php echo $data["Category"]['category_id']; ?>" method="post" id="categoryAdd">
	<input type="hidden" name="data[category_id]" value="<?php echo $data["Category"]['category_id']; ?>"/>
	<div id="admin-control">
		<div class="admin_control_header">
			Chỉnh sửa danh mục <span class="admin_control_notice">(Vui lòng điền đầy đủ thông tin)</span>
		</div>
		<div class="admin_control_row">
			<div class="admin_control_label">
				Chuyên mục :
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<select class="form-control" data-size="8" name="data[root_category_id]" id="data_category_id">
						<option value="0">Chọn danh mục</option>
					    <?php
						    foreach ($rootCat as $item){?>
								<option value="<?php echo $item['root_categories']['id']?>"
									<?php echo $data['Category']['root_category_id']==$item['root_categories']['id']?'selected':''?>
									>
									<?php echo $item['root_categories']['category_name']?></option>
						    
						<?php } ?>
				  	</select>
				</div>
				<div class="category_group_warntip hide"> <!-- Them class "hide" thi se mat di-->
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Bạn chưa chọn danh mục của tin</span>
			    	</div>
				</div>
			</div>
		</div>
		
		<div class="admin_control_row">
			<div class="admin_control_label">
				Tựa đề :
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<input placeholder="Nhập tên danh mục" class="form-control" id="category_name" name="data[category_name]" type="text" maxlength="50"  
					value="<?php echo $data['Category']['category_name']?>"/>
				</div>
				<div class="category_group_warntip" style="display: none;">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Tựa đề phải dài ít nhất 2 ký tự</span>
			    	</div>
				</div>
			</div>
		</div>
			
		<div class="admin_control_row">
			<div class="admin_control_label">
			</div>
			<div class="admin_control_element">
				<div class="element-main">
					<button type="submit" class="btn btn-danger">Sửa danh mục</button>
				</div>
			</div>
		</div>
		<div>
			
		</div>
	</div>
</form>